package cn.kinggm520;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 作者: kinggm Email:731586355@qq.com
 * 时间:  2020-05-22 11:29
 */
@SpringBootApplication
@EnableEurekaClient //该注解 在新版本中可以省略
@EnableFeignClients //开启Feign的功能
public class SellerApp {


    public static void main(String[] args) {
        SpringApplication.run(SellerApp.class,args);
    }


//    配置RestTemplate
    @LoadBalanced
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }




}
